import React, { Component } from 'react';
import {NavLink} from 'react-router-dom'
import './list.css'

class List extends Component {
  constructor() {
    super();
    this.state = {
      list: [
        {name: '单身情歌'},
        {name: '爱情买卖'},
        {name: '广东爱情故事'},
        {name: '汪汪队'}
      ]
    }
  }
  render() {
    return (
      <div>
        {
          this.state.list.map((item, index) => {
            return (
              <NavLink className="list" key={index} to={'/detail/'+item.name}>{item.name}</NavLink>
            )
          })
        }
      </div>
    );
  }
}

export default List;
